package com.cabal.job;

import com.cabal.auth.service.ICabalAuthService;
import com.cabal.mall.service.CabalMallService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 在线账号检测
 * 
 * @author SK
 * @date 2024年10月18日
 *
 */
@Component
@Slf4j
public class CabalOnlineCharacterCheckJob {

	@Autowired
	private ICabalAuthService cabalAuthService;

	@Scheduled(cron="${cabal-online-character-check-cron:0/10 * * * * ?}")   // 每10S检查一次
	public void onlineCharacterCheck() {
		log.info("定时检查在线玩家定时任务开始......");
		cabalAuthService.onlineCharacterCheck();
		log.info("定时检查在线玩家定时任务结束......");
	}
}